package cn.huiyunche.base.service.interfaces;

import cn.huiyunche.base.service.model.CDriverCertinfo;
import cn.huiyunche.base.service.model.CTruckInfo;
import cn.huiyunche.base.service.vo.LayerTruckPicVo;
import cn.huiyunche.base.service.vo.PageVo;
import cn.huiyunche.base.service.vo.TruckInfoAdminVo;
import cn.huiyunche.base.service.vo.TruckInfoVo;
import cn.huiyunche.tools.basic.exceptions.BusinessException;

import java.util.Map;

public interface TruckInfoService {

    /**
     * 查询当前用户车辆信息
     *
     * @return
     * @throws BusinessException
     */
    TruckInfoVo queryTruckInfo(Boolean truckType) throws Exception;

    /**
     * 查询当前用户车辆审核状态
     *
     * @return
     * @throws BusinessException
     */
    Integer currentUserTruckStatus(Boolean truckType) throws Exception;

    /**
     * 新增车辆信息
     *
     * @param truckInfoVo 车辆信息Vo
     * @return
     * @throws BusinessException
     */
    long add(TruckInfoVo truckInfoVo) throws Exception;

    /**
     * 修改当前用户车辆信息
     *
     * @param truckInfoVo 车辆信息Vo
     * @return
     * @throws BusinessException
     */
    long update(TruckInfoVo truckInfoVo) throws Exception;

    /**
     * 根据用户ID 查询当前用户信息
     *
     * @param userId
     * @return
     */
    CDriverCertinfo queryDriverInfoById(Long userId);

    /**
     * 更具用户ID 查询当前车辆信息
     *
     * @param userId
     * @return
     */
    CTruckInfo queryTruckInfoById(Long userId);

    /**
     * 司机车辆信息列表
     *
     * @return
     * @throws BusinessException
     */
    Map<String, Object> list(PageVo page) throws Exception;

    /**
     * 车辆审核
     *
     * @param id        主键ID
     * @param status    状态（10:审核中，20:审核未通过，30：审核已通过）
     * @param userid    用户ID
     * @param truckType 车辆类型
     * @return
     * @throws BusinessException
     */
    int auditUser(String id, String status, String userid, Boolean truckType) throws Exception;

    /**
     * 查看大图
     *
     * @param id
     * @return
     * @throws BusinessException
     */
    LayerTruckPicVo loadPic(String id) throws Exception;

    /**
     * 查询当前用户车辆信息
     *
     * @return
     * @throws BusinessException
     */
    CDriverCertinfo queryDriverInfo(long driverId) throws Exception;

    /**
     * 查询当前用户车辆信息
     *
     * @return
     * @throws BusinessException
     */
    TruckInfoAdminVo queryTruckInfo(long userId) throws Exception;

    /**
     * 根据用户ID 查询司机认证信息
     *
     * @param driverId
     * @return
     */
    CDriverCertinfo queryDriverInfoByUserId(long driverId) throws Exception;

}
